package one.stand.enums;

/**
 * @author zrh
 */

public enum OrderStateChangeEnum {
    PAYMENT_SUCCESS(7, "支付成功"),
    PAYMENT_FAIL(8, "支付失败"),
    DELIVER(9, "订单已发货"),
    ST_REFUND_APPLY(10, "退货申请"),
    ST_NEW_ORDER(11, "新订单通知");

    private Integer code;
    private String message;

    public void setCode(Integer code) {
        this.code = code;
    }

    public Integer getCode() {
        return code;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getMessage() {
        return message;
    }

    OrderStateChangeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public static String getMessage(Integer value) {
        OrderStateChangeEnum[] orderStateEnum = values();
        for (OrderStateChangeEnum orderStateEnum1 : orderStateEnum) {
            if (orderStateEnum1.getCode().equals(value)) {
                return orderStateEnum1.getMessage();
            }
        }
        return null;
    }
}
